<?php 
$site_path = realpath(dirname(__FILE__));
define('__SITE_PATH', $site_path);

include("model/doitac.php");

$arr = explode("/", $_SERVER['PHP_SELF']);

$domain = substr($_SERVER['PHP_SELF'], 0, strlen($arr[1]) + 1);
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body>
        <table>
            <tr>
                <td>Id</td>
                <td>Avata</td>
            </tr>
            <?php
            $doitac = Doitac::findAll();
            foreach ($doitac as $_doitac){  
                ?>
            <tr>
                <td><?php echo $_doitac["id"] ?></td>
                <td><img src="<?php echo $_doitac["avata"] ?>"/></td>
            </tr>
            <?php } ?>
        </table>
    </body>
</html>